const express = require('express');
const http = require('http');
const app = express()
var router = express.Router();

app.use(express.static('public'));


//配置路由 这样访问localhost:3000/select就能访问的接口了
app.use('/api', require('./api_router'))

app.get('/index.html', function (req, res) {
    res.sendFile(__dirname + "/public/" + "index.html");
})


app.use(router);
app.listen(3000);
console.log(3000);